import { Injectable } from '@angular/core';
import {RequestUtil} from "../../../../util/request-util";
import {Observable} from "rxjs/Observable";
import {MsgResult} from "../../../../models/msg-result";
import {DamAPI} from "../../peach-constants";

@Injectable()
export class ProvinceRankingService {
  constructor(
    private requestUtil: RequestUtil
  ) { }
  getProvinceRankingData(obj):Observable<MsgResult>{
    let params = "format=json"+"&startTime="+obj.startTime+"&endTime="+obj.endTime+"&dataType="+obj.dataType+"&sortScopeType=provinceSort";
    return this.requestUtil.get(DamAPI.allRankingData,params);
  }
}
